import { defineStore } from 'pinia'

const loading = defineStore('loading', {
  state: (): {
    loading: boolean // 加载状态
  } => {
    return {
      loading: false,
    }
  },
  getters: {
    getLoading: (state) => state.loading,
  },
  actions: {
    updatedLoading(status: boolean) {
      this.loading = status
    },
  },
})
export default loading
